package com.yuanfengerp.basicInfoManage.paymode.controller;


import com.yuanfengerp.basicInfoManage.paymode.moudel.PayMethodInfo;
import com.yuanfengerp.basicInfoManage.paymode.service.imlp.IPayMethodServiceImpl;
import com.yuanfengerp.publicUtil.Result;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

@CrossOrigin
@RestController
public class PayMethodController {
    @Autowired
    private IPayMethodServiceImpl ipmsi;
    @PostMapping("/insertPayMethodInfo")
    public Result<String> insertPayMethodInfo(@RequestBody PayMethodInfo payMethodInfo){
        return ipmsi.insertPayMethodInfo(payMethodInfo);
    }
    @PostMapping("/deletePayMethodInfo")
    public Result<String> deletePayMethodInfo(int payment_methods_ordinal){
//        System.out.println("删除的ID为："+payment_methods_ordinal);
        return ipmsi.deletePayMethodInfo(payment_methods_ordinal);
    }
    @PostMapping("/updatePayMethodInfo")
    public Result<String> updatePayMethodInfo(@RequestBody PayMethodInfo payMethodInfo){
        return ipmsi.updatePayMethodInfo(payMethodInfo);
    }
    @PostMapping("/selectAllPayMethodInfo")
        public Result<List<PayMethodInfo>> selectAllPayMethodInfo(Map<String,Object> params){
        return ipmsi.selectAllPayMethodInfo(params);
    }
    @PostMapping("/selectPayMethodInfo")
    public Result selectPayMethodInfo(@RequestBody Map<String,Object> params){
        return ipmsi.selectPayMethodInfo(params);
    }
}
